/**
*@Author: 周贞荣
*@Date 2021/8/17 17:55
*@Description 过滤带有空格输入的空格
*@File LabelValue.vue 文件名称
*/
<template>
    <el-input v-model="currentValue" clearable :placeholder="placeholder" :size="size" :disabled="disabled"></el-input>
</template>

<script>
    /**
     * 输入不包含空格
     */
    export default {
        name: "NoSpaceInput",
        props: {
            value: {
                type: String,
                default: ''
            },
            placeholder: {
                type: String,
                default: '请输入内容'
            },
            size: {
                type: String,
                default: 'small'
            },
            disabled:{
                type:Boolean,
                default:false
            }
        },
        computed: {
            currentValue: {
                get() {
                    return this.removeAllSpace(this.value);
                },
                set(val) {
                    this.$emit('input', this.removeAllSpace(val))
                }
            }
        }
    }
</script>

<style scoped>

</style>
